package com.google.code.yanf4j.test;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;

import com.google.code.yanf4j.core.Session;
import com.google.code.yanf4j.core.impl.HandlerAdapter;

public class ChatServerHandler extends HandlerAdapter {
	List<Session> sessionList = new CopyOnWriteArrayList<Session>();
	AtomicInteger userId = new AtomicInteger();

	@Override
	public void onExceptionCaught(Session session, Throwable throwable) {
		System.out.println("onExceptionCaught begin { ");
		System.out.println("onExceptionCaught end } ");
	}

	@Override
	public void onMessageSent(Session session, Object message) {
		System.out.println("onMessageSent sent begin { ");
		System.out.println("onMessageSent sent end } ");
	}

	@Override
	public void onSessionConnected(Session session) {
		System.out.println("onSessionConnected sent begin { ");
		System.out.println("onSessionConnected sent end } ");
	}

	@Override
	public void onSessionStarted(Session session) {
		System.out.println("onSessionStarted sent begin { ");
		System.out.println("onSessionStarted sent end } ");
	}

	@Override
	public void onSessionCreated(Session session) {
		System.out.println("onSessionCreated sent begin { ");
		System.out.println("onSessionCreated sent end } ");
	}

	@Override
	public void onSessionClosed(Session session) {
		System.out.println("onSessionClosed sent begin { ");
		System.out.println("onSessionClosed sent end } ");
	}

	@Override
	public void onMessageReceived(Session session, Object message) {
		System.out.println("onMessageReceived sent begin { ");
		System.out.println("onMessageReceived sent end } ");
	}

	@Override
	public void onSessionIdle(Session session) {
		System.out.println("onSessionIdle sent begin { ");
		System.out.println("onSessionIdle sent end } ");
	}

	@Override
	public void onSessionExpired(Session session) {
		System.out.println("onSessionExpired sent begin { ");
		System.out.println("onSessionExpired sent end } ");
	}

}
